# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-nose-of-yeti
pkgver=2.4.9
pkgrel=0
pkgdesc="Nose plugin that provides an RSpec inspired dsl for python"
url="https://noseofyeti.readthedocs.io/"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-hatchling py3-installer"
checkdepends="py3-pytest py3-pytest-helpers-namespace py3-pytest-asyncio"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/delfick/nose-of-yeti/archive/refs/tags/release-$pkgver.tar.gz
	use-pytest-asyncio.patch
	"
builddir="$srcdir/nose-of-yeti-release-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages test-env
	test-env/bin/python3 -m installer .dist/*.whl
	test-env/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
96e7997404cf5f358d7d513483e2977a2794fcc3907d221d200a39b82e24895af884fafe8be4efff8b419a616c431c7b821ea8b7ab372df0030053fdbf522599  py3-nose-of-yeti-2.4.9.tar.gz
8c834594f02b5a98645c717b4de21ccd33f7f9d70be7f38b1745a405c2078ebc168cc72309698457811631e72f96e1e8a6ebd063d7e697390bfbed6cb850e55c  use-pytest-asyncio.patch
"
